<#include "../common/_layout.html"/>
<@head title="权限">
<style type="text/css">
    .cll {
        background-color: #ddd;
    }
</style>
</@head>
<@layout menu='/resource'>
<!-- Content Header (Page header) -->

</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <form action="${ctx}/resource" id="listForm" method="post" role="form">

                    <div class="box-body table-responsive no-padding">
                        <button type="button" class="btn btn-default" onclick="location.href='${ctx}/resource/edit'">
                            新增
                        </button>
                        <button type="button" id="deleteButton" disabled="disabled" class="btn btn-default"
                                onclick="deleteAll('${ctx}/resource/delete')">删除
                        </button>
                        <table class="table table-hover">
                            <tr class="info">
                                <th title=""><input type="checkbox" id="allCheck"></th>


                                <th title="权限名">权限名</th>
                                <th title="权限描述">权限描述</th>
                                <th title="创建时间">创建时间</th>
                                <th title="修改时间">修改时间</th>
                                <th title="权限父id">父级菜单</th>
                                <th title="权限">权限</th>
                                <th>编辑</th>
                            </tr>
                            <#list page.getList() as item>
                                <tr>
                                    <td><input type="checkbox" name="ids" value="${item.id!}"></td>


                                    <td>${item.name!}</td>
                                    <td>${item.description!}</td>
                                    <td>${item.createDate!}</td>
                                    <td>${item.modifyDate!}</td>
                                    <td>${ResourceMap.get(item.pid!)}</td>
                                    <td>${item.action!}</td>
                                    <td>
                                        <button type="button" class="btn btn-info"
                                                onclick="location.href='${ctx}/resource/edit?id=${item.id}'">编辑
                                        </button>
                                    </td>
                                </tr>
                            </#list>
                        </table>
                        <#if (page.list?size>0)>
                            <#include "../common/pager.html">
                        </#if>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
</@layout>
<@scripts>
<script type="text/javascript" src="${ctx}/adminlte/plugins/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="${ctx}/js/list.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

    });
</script>
</@scripts>